Add a class to the Body element using JavaScript | bobbyhadz

Use the `classList.add()` method to add a class to the body element. The `classList.add()` method will add the supplied class to the body element. Similarly, if you need to remove one or more classes, you can use the `classList.remove()` method.


Who Upvoted this Story


Comments